import {take,call,put,fork} from 'redux-saga/effects';
import serGoodsCommodity from '../servers/serGoodsCommodity';
function * sagWatchGoodsCommodity() {
    while (true){
        let action=yield take('COMMODITY');
        let payload=yield call(serGoodsCommodity,action.data.temGid.gid);
        yield put({type:'commodity',data:{commodityImg:payload}});
        if (action.data.success){
            action.data.success(payload)
        }
    }
}
export default [
    fork(sagWatchGoodsCommodity)
]